package com.wish.wishhouse_resource.controller;


import com.wish.wishhouse_resource.entity.TbPublicFacility;
import com.wish.wishhouse_resource.service.ITbPublicFacilityService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vo.ResultEntity;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 公共配套表 前端控制器
 * </p>
 *
 * @author cyy
 * @since 2021-04-01
 */
@RestController
@RequestMapping("/tbPublicFacility")
public class TbPublicFacilityController {

    @Resource
    private ITbPublicFacilityService publicFacilityService;
    @RequestMapping("/selectAll")
    public ResultEntity selectAll(){
        List<TbPublicFacility> list = publicFacilityService.list();
        return ResultEntity.ok("200",list);
    }

    @Resource
    private ITbPublicFacilityService iTbPublicFacilityService;

    /**
     * 公共配套
     * @return
     */
    @RequestMapping("/public")
    public ResultEntity getPublicFacilitieTypeList() {

        List<TbPublicFacility> list = iTbPublicFacilityService.getPublicFacilitieTypeList();
        return ResultEntity.ok(list);
    }
}

